home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 13 April 1997
- // Author: gf
- //
- //
- // Procedure Name:
- // DynSoftRigidBodyMenu
- //
- // Description:
- // Create the DYNAMICS->Soft/RigidBody menu
- //
- // Input Arguments:
- // parent to parent the menu to.
- //
- // Return Value:
- // None.
- //
-
-
- global proc DynSoftRigidBodyMenu( string $parent )
- {
- setParent -m $parent;
- if( `menu -q -ni $parent` != 0 ) {
- //
- // Menu is built already - just return
- //
- return;
- }
-
- menuItem -l "Create Active Rigid Body"
- -annotation "Create Active Rigid Body: Select geometry objects to create rigid bodies"
- -c "CreateActiveRigidBody"
- -dmc "performDynamics 2 ActiveRigid 2"
- -i "rigid.xpm"
- createActiveRigidBodyItem;
- menuItem -optionBox true -i "rigid.xpm"
- -annotation "Create Active Rigid Body Option Box"
- -l "Create Active Rigid Body Option Box"
- -c "CreateActiveRigidBodyOptions"
- createActiveRigidBodyDialogItem;
-
- menuItem -l "Create Passive Rigid Body"
- -annotation "Create Passive Rigid Body: Select geometry objects to create rigid bodies"
- -c "CreatePassiveRigidBody"
- -dmc "performDynamics 2 PassiveRigid 2"
- -i "rigidPassive.xpm"
- createPassiveRigidBodyItem;
- menuItem -optionBox true -i "rigidPassive.xpm"
- -annotation "Create Passive Rigid Body Option Box"
- -l "Create Passive Rigid Body Option Box"
- -c "CreatePassiveRigidBodyOptions"
- createPassiveRigidBodyDialogItem;
-
- menuItem -l "Create Constraint"
- -annotation "Create Constraint: Select rigid bodies to be constrained"
- -c "CreateConstraint"
- -dmc "performDynamics 2 Constrain 2"
- -i "constraint.xpm"
- createConstraintItem;
- menuItem -optionBox true -i "constraint.xpm"
- -annotation "Create Constraint Option Box"
- -l "Create Constraint Option Box"
- -c "CreateConstraintOptions"
- createConstraintDialogItem;
-
- menuItem -divider true;
-
- menuItem -l "Set Active Key"
- -annotation "Set Active Key: Select one or more active rigid bodies"
- -c "SetActiveKey"
- setActiveKey;
- menuItem -l "Set Passive Key"
- -annotation "Set Passive Key: Select one or more passive rigid bodies"
- -c "SetPassiveKey"
- setPassiveKey;
-
- menuItem -divider true;
-
- menuItem -l "Break Rigid Body Connections"
- -annotation "Break Rigid Body Connections: Break connections on selected rigid bodies that have been keyframed or baked."
- -c "BreakRigidBodyConnection"
- breakConnections;
-
- menuItem -divider true;
-
- menuItem -l "Create Soft Body"
- -annotation "Create Soft Body: Select geometry object(s) to create soft bodies"
- -c "CreateSoftBody"
- -dmc "performDynamics 2 Soft 2"
- -i "soft.xpm"
- createSoftBodyItem;
- menuItem -optionBox true -i "soft.xpm"
- -annotation "Create Soft Body Option Box"
- -l "Create Soft Body Option Box"
- -c "CreateSoftBodyOptions"
- createSoftBodyDialogItem;
-
- menuItem -l "Create Springs"
- -annotation "Create Springs: Select particle(s) to add springs"
- -c "CreateSpring"
- -dmc "performDynamics 2 Spring 2"
- -i "spring.xpm"
- createSpringItem;
- menuItem -optionBox true -i "spring.xpm"
- -annotation "Create Springs Option Box"
- -l "Create Springs Option Box"
- -c "CreateSpringOptions"
- createSpringDialogItem;
-
- // Artian Paint Soft Body Goal tool.
- menuItem -l "Paint Soft Body Weights Tool"
- -image "attrPaint.xpm"
- -annotation "Paint Soft Body Weights Tool: paint goal weights on selected particle node."
- -c "artAttrToolScript 4 \"particle\"" softBodyPaintItem;
- menuItem -optionBox true
- -image "attrPaint.xpm"
- -annotation "Paint Soft Body Weights Tool: paint goal weights on selected particle node."
- -l "Paint Soft Body Weights Tool Option Box"
- -c "artAttrToolScript 3 \"particle\"" softBodyPaintDialogItem;
-
-
- int $dynamicsIsLicensed = `licenseCheck -mode "edit" -type "fx"`;
- if (!$dynamicsIsLicensed)
- {
- menuItem -e -enable false createSoftBodyItem;
- menuItem -e -enable false createSoftBodyDialogItem;
- menuItem -e -enable false createSpringItem;
- menuItem -e -enable false createSpringDialogItem;
- }
- }
-
-
-
-